import Game
#Run, Stephen, Run!

board = Game.Board(0)
deck = Game.PokerDeck()

num = None
num = Game.Prompter("How many players?",range(2,7)).getVal()

players = Game.initPlayers(num,board,('hand'),())

num = 1
for p in players:
    p.addItems(deck.draw(5))
    p.setName("Player " + str(num))
    num += 1



def turn(Player):
    if canPlay(Player):
        card = Player.select(str(Player) + "select a card in hand.",Player.getContents())
        play(card)
    else:
        drawCard(Player)

board.place(deck.draw(),0)
top = board.contents()[-1]

end = False
while not end:
    for p in players:
        if not end:
            end = winner() != None
        if end:
            turn(p)